package top.cdmrx.cornweb.excel.read;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import top.cdmrx.cornweb.excel.DemoData;

import java.util.Map;

/**
 * Created by Mr.陈 time on 2021/9/14 | 12:31
 **/
public class ExcelListener extends AnalysisEventListener<DemoData> {

    /**
     * 一行一行的读取excel的内容
     * @param demoData
     * @param analysisContext
     */
    @Override
    public void invoke(DemoData demoData, AnalysisContext analysisContext) {

        System.out.println("表中数据是："+demoData);
    }


    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {

        System.out.println("表头数据是："+headMap);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
